﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Solidi
{
	public class DependencyType
	{
		private Type _type;
		private DependencyConstructor[] _constructors;

		public DependencyType(Type type)
		{
			_type = type;

			_constructors = type.GetConstructors()
				.OrderByDescending(constructorInfo => constructorInfo.GetParameters().Length)
				.Select(constructorInfo => new DependencyConstructor(constructorInfo))
				.ToArray();
		}

		public DependencyConstructor[] Constructors
		{
			get
			{
				return _constructors;
			}
		}
	}
}
